package com.mgq.algorithm.graph;

import java.util.ArrayList;

/**
 * @author MaGuangQi
 * 图的组成部分 点
 * @date 2022-01-03 21:38
 **/
public class Node {
    //节点值
    int value;
    //入度
    int in;
    //出度
    int out;
    //邻节点集合(从当前node指向的node)就是这个node的邻节点
    ArrayList<Node> nexts;
    //邻边集合
    ArrayList<Edge> edges;

    public Node(int value) {
        this.value = value;
        this.in = 0;
        this.out = 0;
        this.nexts = new ArrayList<>();
        this.edges = new ArrayList<>();
    }
}
